# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import resourceFileOperationConstants

class ResourceFileOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(ResourceFileOperationSubDirectiveTree, self).__init__(parent)
        self.createResourceFileOperationTreeNode()

    def createResourceFileOperationTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "resourceFileOperation"
        self.setText(0,"资源文件操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, resourceFileOperationConstants.ResourceFileOperationConstants.readingResourceFileDirective, "读取资源文件内容")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, resourceFileOperationConstants.ResourceFileOperationConstants.gettingResourceFilePathDirective, "获取资源文件路径")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, resourceFileOperationConstants.ResourceFileOperationConstants.copyingResourceFileDirective, "拷贝资源文件")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, resourceFileOperationConstants.ResourceFileOperationConstants.addingResourceFileToClipBoardDirective, "将资源文件添加到剪切板")
